package task.resources;

import java.util.ArrayList;
import java.util.List;

import automaton.AutomatonMetaData;
import automaton.efsm.DefiniteEFSM;
import task.AbstractAutomatonTask;
import task.config.AbstractAutomatonTaskConfig;
import util.PermutationsGenerator;

public class ResourcesCompetitionTask extends AbstractAutomatonTask {
	private ArrayList[] actions;
	private ArrayList<String> events;
	
	
	public ResourcesCompetitionTask(AbstractAutomatonTaskConfig config) {
		this.config = config;
		actions = new ArrayList[4];
		events = new ArrayList<String>();
		for (int i = 0; i < actions.length; i++) {
			actions[i] = new ArrayList<String>();
		}
		actions[0].add("N");
		actions[1].add("E");
		actions[2].add("S");
		actions[3].add("W");
		
		PermutationsGenerator permutationsGenerator = new PermutationsGenerator(new int[]{0, 1, 2}, 4);
		events = (ArrayList<String>) permutationsGenerator.getVariations();
	}
	
	@Override
	public AutomatonMetaData getFitness(DefiniteEFSM dfa) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public ArrayList<String> getEvents() {
		return events;
	}

	@Override
	public ArrayList[] getActions() {
		return actions;
	}

	@Override
	public int getDesiredNumberOfStates() {
		return config.desiredNumberOfStates();
	}

	@Override
	public double getDesiredFitness() {
		return config.desiredFitness();
	}

	@Override
	public double getMinimumFitness() {
		return config.minimumFitness();
	}

}
